var vm = new Vue({
    el: "#app",
    data: {
        myvalue: "",
        list: [
            //     {
            //     name: "哈哈哈",
            //     zhtai: false
            // }
        ],
    },
    methods: {
        myadd() {
            // console.log(this.myvalue);
            var obj = {
                name: this.myvalue,
                zhtai: false
            };
            this.list.push(obj);
            this.myvalue = "";
        },
        bian() {
            this.zhtai = !this.zhtai;
        },
        gaibian(item) {
            item.zhtai = !item.zhtai;
        },
        mydelete(index) {
            this.list.splice(index, 1)
        }
    },
    computed: {
        unFinishCount() {
            var arr = this.list.filter(item => {
                return item.zhtai == false;
            });
            return arr.length;
        }
    }
})